package com.imooc.netty.ch2;

import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.Enumeration;

/**
 * @author lcy
 * @create 2018-12-18 10:41
 */
public class NetworkInterfaceExample {

    public static void main(String[] args) throws SocketException {
        Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
        while (networkInterfaces.hasMoreElements()) {
            System.out.println(networkInterfaces.nextElement());
        }
    }
}